<div id="inventorySelect">
    <!--页面调整-->
    <el-row v-loading="showLoading"
            element-loading-text="拼命加载中">
        <el-col :span="24">
            <div class="inner btn-nav">
                <el-input
                        @change="selectReturn"
                        v-model="rmsUser.ruUserName"
                        class="input"
                        icon="search"
                        placeholder="创建人"></el-input>
                <el-date-picker
                        v-model="date"
                        type="daterange"
                        align="right"
                        placeholder="创建时间"
                        class="input"
                        :picker-options="pickerOptions">
                </el-date-picker>
                <!--<el-input-->
                        <!--class="input"-->
                        <!--v-model="pdOperator"-->
                        <!--icon="search"-->
                        <!--placeholder="经办人"></el-input>-->
                <el-select
                        @visible-change="selectReturn"
                        v-model="pdType" placeholder="请选择">
                    <el-option :value="-1" label="全部"></el-option>
                    <el-option :value="0" label="异动盘点"></el-option>
                    <el-option :value="1" label="货品盘点"></el-option>
                    <el-option :value="2" label="全仓盘点"></el-option>
                </el-select>
                <el-select
                        @visible-change="selectReturn"
                        v-model="pdArehouseId"
                        placeholder="请选择所属仓库">
                    <el-option :label="obj.baName" :value="obj.baArehouseId"
                               v-for="obj of baseArehouses"></el-option>
                </el-select>
                <button @click="dialogSelectVisible=!dialogSelectVisible" class="btn btn-search"><i
                        class="icon search"></i><span>详细查询</span>
                </button>
                <!--<button @click="multiSelectClick" class="btn btn-multiSelect"><i-->
                        <!--class="icon sel"></i><span>多选</span>-->
                <!--</button>-->

                <!--<button @click="multiExport" class="btn btn-del" v-show="multiSelect"><i-->
                        <!--class=""></i><span>导出</span>-->
                <!--</button>-->
            </div>
            <el-table
                    :data="inventorySelect"
                    :default-sort="{prop: 'sjsj', order: 'descending'}"
                    :max-height="config_table_height()"
                    ref="table"
                    class="inventorySelectTable"
                    @selection-change='multiSelectionChange'
                    style="width: 100%">
                <el-table-column
                        type="expand">
                    <template scope="props">
                        <el-row>
                            <h3 style="margin-top: 0; margin-left: -15px;">盘点查询详细</h3>
                        </el-row>
                        <el-form label-position="left" inline class="demo-table-expand">
                            <el-row>
                                <el-col :span="10">
                                    <el-form-item label="仓库">
                                        <span>{{ props.row.baseArehouse.baName }}</span>
                                    </el-form-item>
                                    <el-form-item label="创建时间">
                                        <span>
                                            <el-icon name="time"></el-icon>
                                            {{ auto_time_new(props.row.pdCreateTime,6) }}</span>
                                    </el-form-item>
                                    <el-form-item label="盘点类型">
                                        <el-tag-s :val="auto_el_tag('pdType',props.row.pdType)"></el-tag-s>
                                    </el-form-item>
                                    <el-form-item label="异动开始">
                                        <span>
                                            <el-icon name="time"></el-icon>
                                             {{auto_time_new(props.row.pdYdBeginTime,6)}}
                                        </span>

                                    </el-form-item>
                                    <el-form-item label="异动结束">
                                        <span>
                                            <el-icon name="time"></el-icon>
                                             {{auto_time_new(props.row.pdYdEndTime,6)}}
                                        </span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="10" :offset="2">
                                    <el-form-item label="盘点状态">
                                        <el-tag-s :val="auto_el_tag('pdStatus',props.row.pdStatus)"></el-tag-s>
                                    </el-form-item>
                                    <el-form-item label="负责人">
                                        <span>{{ props.row.pdChargePerson }}</span>
                                    </el-form-item>

                                    <el-form-item label="经办人">
                                        <span>{{ props.row.pdOperator }}</span>
                                    </el-form-item>
                                    <el-form-item label="差异状态">
                                        <el-tag-s :val="auto_el_tag('pdDiffStatus',props.row.pdDiffStatus)"></el-tag-s>
                                    </el-form-item>
                                    <el-form-item
                                            label="可用操作">
                                        <el-button
                                                size="small"
                                                @click="inlineInventoryDetails(props.$index, props.row)">盘点详情
                                        </el-button>
                                        <el-button
                                                size="small"
                                                type="info"
                                                @click="inlineExport(props.$index, props.row)">导出
                                        </el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-form>
                    </template>
                </el-table-column>
                <el-table-column
                        label="仓库"
                        show-overflow-tooltip
                        prop="baseArehouse.baName"
                        align="center">
                    <template scope="scope">
                        <el-tag
                                type="success"
                                close-transition>
                            {{(scope.row.baseArehouse.baName)}}
                        </el-tag>
                    </template>
                </el-table-column>
                <el-table-column
                        label="创建时间"
                        show-overflow-tooltip
                        align="center">
                    <template scope="scope">
                        {{auto_time_new(scope.row.pdCreateTime)}}
                    </template>
                </el-table-column>
                <el-table-column
                        label="盘点类型"
                        show-overflow-tooltip
                        align="center">
                    <template scope="scope">
                        <el-tag-s :val="auto_el_tag('pdType',scope.row.pdType)"></el-tag-s>
                    </template>
                </el-table-column>
                <el-table-column
                        label="异动开始"
                        show-overflow-tooltip
                        align="center"
                        prop="mdtCount">
                    <template scope="scope">
                        {{auto_time_new(scope.row.pdYdBeginTime)}}
                    </template>
                </el-table-column>
                <el-table-column
                        label="异动结束"
                        show-overflow-tooltip
                        align="center">
                    <template scope="scope">
                        {{auto_time_new(scope.row.pdYdEndTime)}}
                    </template>
                </el-table-column>
                <el-table-column
                        label="创建人"
                        show-overflow-tooltip
                        prop="rmsUser.ruUserName"
                        align="center">
                </el-table-column>
                <el-table-column
                        label="盘点状态"
                        align="center"
                        width="100">
                    <template scope="scope">
                        <el-tag-s :val="auto_el_tag('pdStatus',scope.row.pdStatus)"></el-tag-s>
                    </template>
                </el-table-column>
                <el-table-column
                        v-if="multiSelect"
                        type="selection"
                        width="60">
                </el-table-column>
            </el-table>
            <div class="block">
                <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="1"
                        :page-sizes="[5, 10, 15, 20, 100, 500, 1000, 5000, 10000]"
                        :page-size="pageSize"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="currentTotal">
                </el-pagination>
            </div>
        </el-col>
    </el-row>
    <el-dialog
            size="tiny"
            class="select"
            v-model="dialogSelectVisible">
        <div class="dialog-title clearfix" slot="title">
            <span class="el-dialog__title">详细查询</span>
        </div>
        <el-form :model="form">
            <el-form-item label="创建时间"
                          :label-width="formLabelWidth">
                <el-date-picker
                        v-model="form.pdCreateTime"
                        type="daterange"
                        align="right"
                        placeholder="创建时间"
                        class="input"
                        :picker-options="pickerOptions">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="创建人"
                          :label-width="formLabelWidth">
                <el-input
                        v-model="form.ruUserName"
                        class="input"
                        icon="search"
                        placeholder="创建人"></el-input>
            </el-form-item>
            <el-form-item label="经办人"
                          :label-width="formLabelWidth">
                <el-input
                        class="input"
                        v-model="form.pdOperator"
                        icon="search"
                        placeholder="经办人"></el-input>
            </el-form-item>
            <el-form-item label="盘点状态"
                          :label-width="formLabelWidth">
                <el-select v-model="form.pdStatus" placeholder="请选择">
                    <el-option :value="-1" label="全部"></el-option>
                    <el-option :value="0" label="初始"></el-option>
                    <el-option :value="1" label="盘点确认"></el-option>
                    <el-option :value="2" label="作废"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="差异状态"
                          :label-width="formLabelWidth">
                <el-select v-model="form.pdDiffStatus" placeholder="请选择">
                    <el-option :value="-1" label="全部"></el-option>
                    <el-option :value="0" label="无差异"></el-option>
                    <el-option :value="1" label="有差异"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="所属仓库" :label-width="formLabelWidth">
                <el-select
                        :disabled="watchView"
                        v-model="form.pdArehouseId"
                        placeholder="请选择所属仓库">
                    <el-option :label="obj.baName" :value="obj.baArehouseId"
                               v-for="obj of baseArehouses"></el-option>
                </el-select>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="form = _form()">重置</el-button>
            <el-button type="primary" @click="selectSubmit" :loading="selectLoading">查询</el-button>
        </div>
    </el-dialog>
    <el-dialog
            size="large"
            title="盘点详情"
            v-model="dialogInventoryVisible">
        <el-table
                :data="inventory"
                highlight-current-row
                style="width: 100%">
            <el-table-column
                    label="库位名称"
                    show-overflow-tooltip
                    align="center"
                    prop="baseLocation.blLname">
            </el-table-column>
            <el-table-column
                    label="货品编号"
                    show-overflow-tooltip
                    align="center"
                    prop="baseGoods.bgGoodsNo">
            </el-table-column>
            <el-table-column
                    label="货品名称"
                    show-overflow-tooltip
                    align="center"
                    prop="baseGoods.bgGoodsName">
            </el-table-column>
            <el-table-column
                    label="计划数量"
                    show-overflow-tooltip
                    align="center"
                    prop="pdsRepertoryCount">
            </el-table-column>
            <el-table-column
                    label="盘点数量"
                    show-overflow-tooltip
                    align="center"
                    prop="pdsPdCount">
            </el-table-column>
        </el-table>
    </el-dialog>
</div>
<link rel="stylesheet" href="index.scss">
<script src="index.js">

</script>





